from celery import Celery

app = Celery('test', broker='redis://localhost:6379/0')

@app.task
def add(x, y):
    return x + y

if __name__ == '__main__':
    result = add.delay(4, 4)
    print(result.get())